﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;

namespace Shop.Interface.Customer
{
    public abstract class ICustomer
    {
        public static Dictionary<string, object> Switch(string[] switchNames)
        {
            if (switchNames.Length <= 1) { return Common.ReturnValue.ErrAction(); }
            string swithname = switchNames[2];
            ICustomer cv1 = new Implementation.Customer.ICustomer_V1();
            switch (swithname)
            {
                case "RegisterSendMessage":
                    return cv1.RegisterSendMessage();

                case "Register":
                    return cv1.Register();

                case "Login":
                    return cv1.Login();

                case "ChangePassWordMSG":
                    return cv1.ChangePassWordMSG();

                case "ChangePassWord":
                    return cv1.ChangePassWord();

                case "CheckToken":
                    return cv1.CheckToken();

                case "GetSaleCode":
                    return cv1.GetSaleCode();

                default:
                    return Common.ReturnValue.ErrAction();
            }
        }

        // 发送验证码GET方法
        public abstract Dictionary<string, object> RegisterSendMessage();

        // 用于客户注册POST方法
        public abstract Dictionary<string, object> Register();

        //客户更改密码
        public abstract Dictionary<string, object> ChangePassWord();

        //客户更改密码短信验证
        public abstract Dictionary<string, object> ChangePassWordMSG();

        //客户登录
        public abstract Dictionary<string, object> Login();

        //检验登录是否过期
        public abstract Dictionary<string, object> CheckToken();

        //获取销售码
        public abstract Dictionary<string, object> GetSaleCode();
    }
}